#include "mapp.h"

#include <stdio.h>
#include "delay.h"
#include "led.h"

TimesilceTaskObj task_1;
TimesilceTaskObj task_2;
TimesilceTaskObj task_3;
TimesilceTaskObj task_4;
TimesilceTaskObj task_5;

static void task1_hdl() { ledApp(); }

static void task2_hdl() { printf(">> task 2 is running ...\n"); 
}

static void task3_hdl() { printf(">> task 3 is running ...\n"); 
}

static void task4_hdl() { printf(">> task 4 is running ...\n"); 
}

static void task5_hdl() { printf(">> task 5 is running ...\n"); 
}

void task_init(void) {
  timesLiceTaskInit(&task_1, task1_hdl, 1, 250);
  timesLiceTaskInit(&task_2, task2_hdl, 2, 100);
  timesLiceTaskInit(&task_3, task3_hdl, 3, 110);
  timesLiceTaskInit(&task_4, task4_hdl, 4, 100);
  timesLiceTaskInit(&task_5, task5_hdl, 5, 100);
  timesLiceTaskAdd(&task_1);
  timesLiceTaskAdd(&task_2);
  timesLiceTaskAdd(&task_3);
  timesLiceTaskAdd(&task_4);
  timesLiceTaskAdd(&task_5);
}

